package com.ethink.order.facadeImpl;

import com.ethink.order.api.JkyTradeLogFacade;
import com.ethink.order.api.info.JkyTradeLogInfo;
import com.ethink.order.api.request.JkyTradeLogAddRequest;
import com.ethink.order.api.request.JkyTradeLogUpdateCkFlagRequest;
import com.ethink.order.api.request.JkyTradeLogUpdateErrorRequest;
import com.ethink.order.api.request.JkyTradeLogUpdateRequest;
import com.ethink.order.api.response.JkyTradeLogAddResponse;
import com.ethink.order.api.response.JkyTradeLogGetDetailResponse;
import com.ethink.order.service.JkyTradeLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 吉客云销售单 Facade接口实现
 *
 * @author default
 * @date 2022-11-25
 */
@RestController
@Slf4j
@RequestMapping("order-service/facade/v1/jkyTradeLog")
public class JkyTradeLogFacadeImpl implements JkyTradeLogFacade {

    @Autowired
    private JkyTradeLogService jkyTradeLogService;

    @Override
    public JkyTradeLogInfo getJkyTradeLogByTradeNo(String tradeNo) {
        return jkyTradeLogService.getJkyTradeLogByTradeNo(tradeNo);
    }

    @Override
    public JkyTradeLogInfo lastGmtModifiedJkyTradeLog() {
        return jkyTradeLogService.lastGmtModifiedJkyTradeLog();
    }

    @Override
    public JkyTradeLogInfo lastConsignTimeJkyTradeLog() {
        return jkyTradeLogService.lastConsignTimeJkyTradeLog();
    }

    @Override
    public JkyTradeLogGetDetailResponse topOneProcessingJkyTradeLog() {
        return jkyTradeLogService.topOneProcessingJkyTradeLog();
    }

    @Override
    public JkyTradeLogAddResponse addJkyTradeLog(JkyTradeLogAddRequest request) {
        return jkyTradeLogService.addJkyTradeLog(request);
    }

    @Override
    public void updateJkyTradeLog(JkyTradeLogUpdateRequest request) {
        jkyTradeLogService.updateJkyTradeLog(request);
    }

    @Override
    public void updateJkyTradeLogCkFlag(JkyTradeLogUpdateCkFlagRequest request) {
        jkyTradeLogService.updateJkyTradeLogCkFlag(request);
    }

    @Override
    public void updateJkyTradeLogError(JkyTradeLogUpdateErrorRequest request) {
        jkyTradeLogService.updateJkyTradeLogError(request);
    }

}